package learnning.dao;

import org.hibernate.HibernateException;

import learnning.dao.base.HibernateDao;
import learnning.entity.Category;

public class CategoryDao extends HibernateDao {
	public void addCategory(String title) {
		try {
			begin();
			Category category = new Category(title);
			getSession().save(category);
			commit();
		} catch (HibernateException e) {
			rollback();
			e.printStackTrace();
		}
	}
}
